#coding='utf-8'
import os
import shutil
import time
from string import Template

import pytest

from allure_design.title_design import set_windos_title, get_json_data, write_json_data

if __name__ == '__main__':
    pytest.main()
    time.sleep(3)
    os.system("allure generate ./temps -o ./reports --clean")
    # 自定义测试报告标题
    set_windos_title("本地项目的接口自动化测试脚本")
    # 自定义测试报告标题
    report_title = get_json_data("管某人的自动化测试")
    write_json_data(report_title)

    # 复制日志
    shutil.move("log/frame.log", "log/frame_" + str(int(time.time())) + ".log")
    time.sleep(2)
    os.system("allure open ./reports")



